﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:System="clr-namespace:System;assembly=mscorlib"
	xmlns:vok="clr-namespace:ViewOn.Kernel"
    xmlns:host="clr-namespace:ViewOnCore.HostContract;assembly=ViewOnCore">

	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="..\Shared.xaml" />
	</ResourceDictionary.MergedDictionaries>

	<Style x:Key="Button.TransparentWithEffect3" TargetType="{x:Type Button}">
		<Setter Property="FocusVisualStyle" Value="{x:Null}" />
		<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
		<Setter Property="HorizontalContentAlignment" Value="Center"/>
		<Setter Property="VerticalContentAlignment" Value="Center"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Border Background="#00ffffff">
						<ContentPresenter>
							<ContentPresenter.BitmapEffect>
								<OuterGlowBitmapEffect x:Name="HoverEffect" GlowColor="{Binding Source={x:Static host:Host.UIService}, Path=GlowColors.VOGColor10}" GlowSize="0" Noise="0" Opacity="0.5" />
							</ContentPresenter.BitmapEffect>
						</ContentPresenter>
					</Border>
					<ControlTemplate.Triggers>
						<Trigger Property="IsKeyboardFocused" Value="true"/>
						<Trigger Property="ToggleButton.IsChecked" Value="true"/>
						<Trigger Property="IsEnabled" Value="false">
							<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
						</Trigger>
						<EventTrigger RoutedEvent="Mouse.MouseEnter">
							<BeginStoryboard>
								<Storyboard>
									<Storyboard.Children>
										<DoubleAnimation To="2" Duration="00:00:00.1" Storyboard.TargetName="HoverEffect" Storyboard.TargetProperty="GlowSize" />
									</Storyboard.Children>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger>
						<EventTrigger RoutedEvent="Mouse.MouseLeave">
							<BeginStoryboard>
								<Storyboard>
									<Storyboard.Children>
										<DoubleAnimation To="0" Duration="00:00:00.1" Storyboard.TargetName="HoverEffect" Storyboard.TargetProperty="GlowSize" />
									</Storyboard.Children>
								</Storyboard>
							</BeginStoryboard>
						</EventTrigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>